}catch(e){alert("BetterPrivacy\r\nError on exit\r\nPlease report this to the author " + e);}
//When a string is assigned to the returnValue property of window.event, a dialog box appears....
//the problem seems to be:
//1. when onbeforeunload is called, it will take the return value of the handler as window.event.returnValue.
//2. it will then parse the return value as a string (unless it is null)
//3. since false is parsed as a string, the dialogue box will fire, which will then pass an appropriate true/false
//the result is, there doesn't seem to be a way of assigning false to onbeforeunload, to prevent it from the default dialogue.
// return true;
},
DelDOM: function()
{
var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
file.append("webappsstore.sqlite");
if(file.exists()) // if it exists, delete
{
try{
file.remove(false);
}catch(e){
bpriv.LOG("BetterPrivacy: Deletion of DOM data currently impossible due to open handle - trying again later.");
}
}
},
checkFlashFolder: function()
{
if (!bpriv.GetFlashDir(0))
{
if (!navigator.preference("extensions.bprivacy.donotaskforfolder"))
{
check = {value: false};
var confirmed = bpriv.prompts.confirmCheck(window, "BetterPrivacy", bpriv.getString("askfornewpath"), bpriv.getString("askfornewpath2"), check);